https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi Why it is getting failed
# ❓・ai-evy-support
n
Hi @AI Evy Why it is getting failed ? <script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="public_key_a0acf11a28161ca549599" data-agent-id="agent_0c23b39db137ea05a7ff005be4" data-agent-version="V8" data-widget="callback" data-phone-number="+91XXXXXXXXXX" data-title="Request a Call" data-countries="US,CA,GB" data-tc="https://yourwebsite.com/terms" data-color="#FFA07A" data-recaptcha-key="" > Is there anything wrong in my code ? https://cdn.discordapp.com/attachments/1302816169367044149/1419768477371072573/Screenshot_2025-09-23_010216.png?ex=68d2f5ef&is=68d1a46f&hm=bef8b846bde318169915fc228b452036449d9db0ab953a23f399b2cb4a338d6b&
a
Thanks for tagging me @nishh_72802. I'll look through relevant sources and get back to you shortly.
### Answer Your script tag is mostly correct for integrating the Retell Callback Widget, but there are a few important things to check: 1. The attribute for agent version should be a number, not a string like "V8". Use a numeric value (e.g., data-agent-version="8") as shown in the documentation [(1) ]() . 2. The phone number in data-phone-number must be your actual Retell-provided phone number in international format (e.g., +14157774444) , not a placeholder or a masked value . 3. The comments inside the script tag (
<!-- ... -->
) are not valid inside HTML attributes and may cause issues. Remove them. Here is the correct script tag structure based on the official documentation:
Copy code
html
<script
  id="retell-widget"
  src="<https://dashboard.retellai.com/retell-widget.js%22>
  type="module"
  data-public-key="YOUR_RETELL_PUBLIC_KEY"
  data-agent-id="YOUR_AGENT_ID"
  data-agent-version="YOUR_AGENT_VERSION"
  data-widget="callback"
  data-phone-number="YOUR_RETELL_PHONE_NUMBER"
  data-title="Request a Call"
  data-countries="US,CA,GB"
  data-tc="<https://yourwebsite.com/terms%22>
  data-color="#FFA07A"
  data-recaptcha-key=""
></script>
Replace all placeholder values with your actual credentials and numbers. Double-check that your public key, agent ID, agent version, and phone number are correct and active in your Retell dashboard .
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.